using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetQRCodeResponse : GeneratedMessageLite<GetQRCodeResponse, GetQRCodeResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetQRCodeResponse, GetQRCodeResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetQRCodeResponse result;
			protected override GetQRCodeResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetQRCodeResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetQRCodeResponse DefaultInstanceForType
			{
				get
				{
					return GetQRCodeResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public SKBuiltinBuffer_t QRCode
			{
				get
				{
					return this.result.QRCode;
				}
				set
				{
					this.SetQRCode(value);
				}
			}
			public uint Style
			{
				get
				{
					return this.result.Style;
				}
				set
				{
					this.SetStyle(value);
				}
			}
			public Builder()
			{
				this.result = GetQRCodeResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetQRCodeResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetQRCodeResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetQRCodeResponse other = this.result;
					this.result = new GetQRCodeResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetQRCodeResponse.Builder Clear()
			{
				this.result = GetQRCodeResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetQRCodeResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetQRCodeResponse.Builder(this.result);
				}
				return new GetQRCodeResponse.Builder().MergeFrom(this.result);
			}
			public override GetQRCodeResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetQRCodeResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetQRCodeResponse)
				{
					return this.MergeFrom((GetQRCodeResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetQRCodeResponse.Builder MergeFrom(GetQRCodeResponse other)
			{
				return this;
			}
			public override GetQRCodeResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetQRCodeResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetQRCodeResponse._getQRCodeResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetQRCodeResponse._getQRCodeResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasQRCode)
							{
								builder2.MergeFrom(this.QRCode);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.QRCode = builder2.BuildPartial();
							continue;
						}
						if (num3 == 40u)
						{
							this.result.hasStyle = input.ReadUInt32(ref this.result.style_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetQRCodeResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetQRCodeResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetQRCodeResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetQRCodeResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetQRCodeResponse.Builder SetQRCode(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasQRCode = true;
				this.result.qRCode_ = value;
				return this;
			}
			public GetQRCodeResponse.Builder SetQRCode(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasQRCode = true;
				this.result.qRCode_ = builderForValue.Build();
				return this;
			}
			public GetQRCodeResponse.Builder MergeQRCode(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasQRCode && this.result.qRCode_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.qRCode_ = SKBuiltinBuffer_t.CreateBuilder(this.result.qRCode_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.qRCode_ = value;
				}
				this.result.hasQRCode = true;
				return this;
			}
			public GetQRCodeResponse.Builder ClearQRCode()
			{
				this.PrepareBuilder();
				this.result.hasQRCode = false;
				this.result.qRCode_ = null;
				return this;
			}
			public GetQRCodeResponse.Builder SetStyle(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStyle = true;
				this.result.style_ = value;
				return this;
			}
			public GetQRCodeResponse.Builder ClearStyle()
			{
				this.PrepareBuilder();
				this.result.hasStyle = false;
				this.result.style_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int QRCodeFieldNumber = 2;
		public const int StyleFieldNumber = 5;
		private static readonly GetQRCodeResponse defaultInstance;
		private static readonly string[] _getQRCodeResponseFieldNames;
		private static readonly uint[] _getQRCodeResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasQRCode;
		private SKBuiltinBuffer_t qRCode_;
		private bool hasStyle;
		private uint style_;
		private int memoizedSerializedSize = -1;
		public static GetQRCodeResponse DefaultInstance
		{
			get
			{
				return GetQRCodeResponse.defaultInstance;
			}
		}
		public override GetQRCodeResponse DefaultInstanceForType
		{
			get
			{
				return GetQRCodeResponse.DefaultInstance;
			}
		}
		protected override GetQRCodeResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public SKBuiltinBuffer_t QRCode
		{
			get
			{
				return this.qRCode_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public uint Style
		{
			get
			{
				return this.style_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseResponse && this.hasQRCode && this.hasStyle && this.BaseResponse.IsInitialized && this.QRCode.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasQRCode)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.QRCode);
				}
				if (this.hasStyle)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.Style);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetQRCodeResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getQRCodeResponseFieldNames = GetQRCodeResponse._getQRCodeResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getQRCodeResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasQRCode)
			{
				output.WriteMessage(2, getQRCodeResponseFieldNames[1], this.QRCode);
			}
			if (this.hasStyle)
			{
				output.WriteUInt32(5, getQRCodeResponseFieldNames[2], this.Style);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasQRCode)
			{
				num ^= this.qRCode_.GetHashCode();
			}
			if (this.hasStyle)
			{
				num ^= this.style_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GetQRCodeResponse getQRCodeResponse = object_0 as GetQRCodeResponse;
			return getQRCodeResponse != null && (this.hasBaseResponse == getQRCodeResponse.hasBaseResponse && (!this.hasBaseResponse || this.baseResponse_.Equals(getQRCodeResponse.baseResponse_))) && (this.hasQRCode == getQRCodeResponse.hasQRCode && (!this.hasQRCode || this.qRCode_.Equals(getQRCodeResponse.qRCode_))) && (this.hasStyle == getQRCodeResponse.hasStyle && (!this.hasStyle || this.style_.Equals(getQRCodeResponse.style_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetQRCodeResponse, GetQRCodeResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetQRCodeResponse, GetQRCodeResponse.Builder>.PrintField("QRCode", this.hasQRCode, this.qRCode_, writer);
			GeneratedMessageLite<GetQRCodeResponse, GetQRCodeResponse.Builder>.PrintField("Style", this.hasStyle, this.style_, writer);
		}
		public static GetQRCodeResponse ParseFrom(byte[] data)
		{
			return GetQRCodeResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetQRCodeResponse MakeReadOnly()
		{
			return this;
		}
		public static GetQRCodeResponse.Builder CreateBuilder()
		{
			return new GetQRCodeResponse.Builder();
		}
		public override GetQRCodeResponse.Builder ToBuilder()
		{
			return GetQRCodeResponse.CreateBuilder(this);
		}
		public override GetQRCodeResponse.Builder CreateBuilderForType()
		{
			return new GetQRCodeResponse.Builder();
		}
		public static GetQRCodeResponse.Builder CreateBuilder(GetQRCodeResponse prototype)
		{
			return new GetQRCodeResponse.Builder(prototype);
		}
		static GetQRCodeResponse()
		{
			GetQRCodeResponse.defaultInstance = new GetQRCodeResponse().MakeReadOnly();
			GetQRCodeResponse._getQRCodeResponseFieldNames = new string[]
			{
				"BaseResponse",
				"QRCode",
				"Style"
			};
			GetQRCodeResponse._getQRCodeResponseFieldTags = new uint[]
			{
				10u,
				18u,
				40u
			};
			object.ReferenceEquals(micromsg.Proto.GetQRCodeResponse.Descriptor, null);
		}
	}
}
